<script src="jquery-1.10.2.js" type="text/javascript"></script>
<script type="text/javascript">
  $(document).ready(function(){


      var val = $('.success').text();
      alert(val)

      var val = $('.success').html();
      alert(val)

  });
</script>

<div class="success">
This is success <strong>message</strong> 1.
<ul>
  <li>This is success message 2.</li>
  <li>This is success message 3.</li>
  <li>This is success message 4.</li>
  <li>This is success message 5.</li>
</ul>

This is success message 6.
This is success message 7.
</div>
